package rpcclient;

import java.lang.reflect.Proxy;
import java.net.InetSocketAddress;

public class RPCClient<T> {
	public static <T> T getRemoteProxyObj(final Class<?> serviceInterface, final InetSocketAddress addr) {
        return (T) Proxy.newProxyInstance(serviceInterface.getClassLoader(), new Class<?>[]{serviceInterface},
                new RpcInvocationHandler(serviceInterface,addr));
    }
}
